package com.gitee.qdbp.base.model.condition;

import java.io.Serializable;
import com.gitee.qdbp.base.annotation.DataIsolation;
import com.gitee.qdbp.base.annotation.OperateTraces;

/**
 * Where条件
 *
 * @author zhaohuihua
 * @version 160728
 */
@DataIsolation(target = "where")
@OperateTraces(target = "where")
public class Where<T> implements Serializable {

    /** 版本序列号 **/
    private static final long serialVersionUID = 2922204104529162882L;

    /** 查询条件 **/
    private T where;

    /** 获取查询条件 **/
    public T getWhere() {
        return where;
    }

    /** 设置查询条件 **/
    public void setWhere(T where) {
        this.where = where;
    }

    /** 转换 **/
    public static <T> Where<T> of(T where) {
        Where<T> q = new Where<>();
        q.setWhere(where);
        return q;
    }
}
